package com.tech.koufu.model;

import org.json.JSONObject;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 大赛通知
 * 
 * @author jl_luo
 * 
 */
public class CompetitionNotice implements android.os.Parcelable {

	public String title;
	public String content;
	public String addTime;

	public CompetitionNotice() {

	}

	public CompetitionNotice(JSONObject object) {
		this.title = object.optString("title");
		this.content = object.optString("content");
		this.addTime = object.optString("addTime");
	}

	public CompetitionNotice(Parcel parcel) {
		this.title = parcel.readString();
		this.content = parcel.readString();
		this.addTime = parcel.readString();
	}

	public static final Parcelable.Creator<CompetitionNotice> CREATOR = new Creator<CompetitionNotice>() {

		@Override
		public CompetitionNotice createFromParcel(Parcel source) {
			return new CompetitionNotice(source);
		}

		@Override
		public CompetitionNotice[] newArray(int size) {
			return new CompetitionNotice[size];
		}
	};

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(title);
		dest.writeString(content);
		dest.writeString(addTime);
	}
}
